﻿<%@ Page Language="C#" MasterPageFile="~/WebSite/teacher.master" AutoEventWireup="true" CodeFile="t_data_clustering.aspx.cs" Inherits="WebSite_t_data_clustering" Title="无标题页" %>

<%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <style type="text/css">
        .ClusterStyle
        {
            margin:10px auto;
            padding:0px auto;
            overflow:visible;
        }
        .ClusterStyle h1
        {
        	margin-left:225px;
        	background-image:url(../images/cluster.gif);
        	background-repeat:no-repeat;
        	width:150px;
        	font-size:23px;
        	height:50px;
        	padding-left:50px;
        	padding-top:10px;
        	margin-top:-5px;
        }
        .ChooseBlock
        {
           width:600px;
           margin-top:5px auto;
           padding:0px auto;
       	}
       	.DropDownStyle
       	{
            margin-top:5px;
            margin-left:10px;
            font-size:14px;
            width:auto;
       	}
       	.ChooseBlock span
       	{
       		margin-left:30px;
       		margin-top:5px;
       		width:50px;
       		font-size:16px;
        }
        .GreyLine
        {
            background-image:url(../images/lineGrey.png);
            height:2px;
            width:600px;
            background-repeat:no-repeat; 
            margin-bottom:4px;	
       	}
       	.ClusterBtnStyle
       	{
       		margin:5px 220px auto;
    	    width:120px;
    	    height:30px;
    	    background-color:#669DF0;
    	    font-size:16px;
    	    font-weight:bold;
    	    color:#FFFFFF;
       	}
       	.ClusterResultTableStyle
       	{
       	    font-size:14px;
       	    margin:20px 30px auto;
       	    width:500px;
       	}
       	.TableStyle
       	{
       		border-style:solid;
       		border-width:2px;
       		border-collapse:collapse;
       		border-color:Blue;
            margin:5px auto;
            width:500px;		
       	}
       	.ColumnLStyle
       	{
       		font-size:14px;
       		border-style:solid;
       		border-width:1px;
       		border-color:Blue;
       		background-color:Olive;
       		border-collapse:collapse;
       		vertical-align:middle;
       		text-align:center;
       		width:100px;
       	}
       	.ColumnRStyle
       	{
       		font-size:14px;
       		border-style:solid;
       		border-width:1px;
       		border-color:Blue;
       		border-collapse:collapse;
       		vertical-align:middle;
       		text-align:center;
       		width:400px;
       	}
    </style>
    <div class="ClusterStyle">
        <h1>数据聚类分析</h1>
        <div class="ChooseBlock">
            <b>请选择数据分析范围：</b><br/>
            <div class="GreyLine"></div>
            <span>学院:</span><asp:DropDownList ID="CollegeDropDownList" runat="server" 
                CssClass="DropDownStyle" DataSourceID="XmlDataSource1" DataTextField="College" 
                DataValueField="id"/>
                
           <span>测试年份:</span><asp:DropDownList ID="TestDateDropDownList" runat="server" 
                CssClass="DropDownStyle" >
                <asp:ListItem>全部</asp:ListItem>
                <asp:ListItem>2010</asp:ListItem>
                <asp:ListItem>2009</asp:ListItem>
            </asp:DropDownList>
            
            <span>年级:</span><asp:DropDownList ID="GradeDropDownList" runat="server" 
                CssClass="DropDownStyle" >
                <asp:ListItem>全部年级</asp:ListItem>
                <asp:ListItem>2009</asp:ListItem>
                <asp:ListItem>2008</asp:ListItem>
                <asp:ListItem>2007</asp:ListItem>
                <asp:ListItem>2006</asp:ListItem>
            </asp:DropDownList>
            
            <span>民族:</span><asp:DropDownList ID="NationalityDropDownList" runat="server" 
                CssClass="DropDownStyle" DataSourceID="SqlDataSource1" DataTextField="Column1" 
                DataValueField="Column1" />
                
            <span>&nbsp;&nbsp; &nbsp;&nbsp; 测试项目:</span><asp:DropDownList ID="TargetDropDownList" runat="server" 
                CssClass="DropDownStyle" DataSourceID="XmlDataSource2" DataTextField="Test" 
                DataValueField="id" />
                
             <span>性别:&nbsp;&nbsp; </span><asp:DropDownList ID="SexDropDownList" runat="server" CssClass="dropdownstyle" >
                <asp:ListItem>全部</asp:ListItem>
                <asp:ListItem>男</asp:ListItem>
                <asp:ListItem>女</asp:ListItem>
             </asp:DropDownList>
             <br /><br />
             
             <b>请选择数据聚类分成的组个数:</b>
             <div class="GreyLine"></div>
             <span>分组个数（1-10组）</span>
             <asp:DropDownList ID="PartNumDropDownList" runat="server" CssClass="DropDownStyle"/>
                
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:CSHDBConnectionString %>" 
                SelectCommand="SELECT LTRIM(RTRIM(Nationality)) FROM NationalityTable">
            </asp:SqlDataSource>
            <asp:XmlDataSource ID="XmlDataSource1" runat="server" 
                DataFile="~/WebSite/CollegeName.xml" TransformFile="~/WebSite/CollegeName.xslt">
            </asp:XmlDataSource>            
            <asp:XmlDataSource ID="XmlDataSource2" runat="server" 
                DataFile="~/WebSite/TestItems.xml" TransformFile="~/WebSite/TestItems.xslt">
            </asp:XmlDataSource> 
        </div>
        <div style="margin-top:20px;">
            <b>聚类分析结果：</b>
            <div class="GreyLine">
            </div>
            <asp:chart id="Chart1" runat="server" Palette="SemiTransparent" 
                            ImageType="Png" ImageUrl="~/TempImages/ChartPic_#SEQ(300,3)" 
                            BackColor="255, 224, 192" Width="638px" Height="444px" borderlinestyle="Solid" 
                            backgradienttype="TopBottom" borderlinewidth="2" borderlinecolor="181, 64, 1" 
                            onclick="Chart1_Click">
							<titles>
								<asp:title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" 
                                    ShadowOffset="3" Text="聚类分析结果" Alignment="TopLeft" ForeColor="26, 59, 105" 
                                    Name="Title1"></asp:title>
							</titles>
							<legends>
								<asp:legend Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold" TitleFont="Microsoft Sans Serif, 8pt, style=Bold"></asp:legend>
							</legends>
							<borderskin skinstyle="Emboss"></borderskin>
							<series>
								<asp:series Name="Series1" ChartType="Pie" BorderColor="180, 26, 59, 105" ShadowOffset="4" ></asp:series>
							</series>
							<chartareas>
								<asp:chartarea Name="Default" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="OldLace" ShadowColor="Transparent" BackGradientStyle="TopBottom">
									<axisy linecolor="64, 64, 64, 64">
										<labelstyle font="Trebuchet MS, 8.25pt, style=Bold"></labelstyle>
										<majorgrid linecolor="64, 64, 64, 64"></majorgrid>
									</axisy>
									<axisx linecolor="64, 64, 64, 64">
										<labelstyle font="Trebuchet MS, 8.25pt, style=Bold"></labelstyle>
										<majorgrid linecolor="64, 64, 64, 64"></majorgrid>
									</axisx>
								</asp:chartarea>
							</chartareas>
						</asp:chart>
        </div>
        <asp:Button ID="ClusterBtn" runat="server" CssClass="ClusterBtnStyle" 
            Text="开始聚类分析" onclick="ClusterBtn_Click"  />
   </div>

</asp:Content>

